Cube Yogi
Cube Yogi
Leader in Zoho Solutions/Consultation

Calculating Age from Date of Birth in Zoho CRM

Here is our approach for calculating age from Date of Birth in Zoho CRM

Our Approach

We can calculate Age from Date of Birth using 'Workflow Rules' in Zoho CRM

1. Adding field for Age(Custom Field) 

1.1 Go to 'Setup' --> Tap on 'Modules and Fields'

1.2 Select the Module

1.3 Select the layout

1.4 Drag and drop a 'Number' field and name it as 'Age'

1.5 Field (Age) is  added

2. Hiding Age field (Age field will show up only when the calculated age value is updated )

2.1 Select 'Date of Birth' field .Now , tap on '...' and select 'Create Layout Rule'

2.2 Enter the layout rule name and select 'Date of Birth' field then choose criteria as 'is not empty' 

2.3 Tap on 'Trigger an action'

2.4 Tap on 'Show Fields'

2.5 Choose the field to hide 

2.6 Select 'Age ' field.  Now, Go to 'Setup'

3. Creating Workflow Rules

3.1 Go to 'Setup' --> Tap on 'Workflow Rules'

3.2 Tap on 'Create Rule'

3.3 Fill up the mandatory fields

3.4 Select 'Create or Edit'

3.5 Choose rule to apply for all entries

3.6 Select 'Function' from 'Instant Actions'

3.7 Tap on 'Write your own'

3.8 Fill up the mandatory fields

3.9 Copy the code from code snippet and paste it here then tap on 'Edit Arguments'

3.10 Select 'Contact ID' as argument and name it as 'contact_id'

Code Snippet